# import random
# s = dict()
# with open("ipx.txt", "w+", encoding='utf-8') as fp:
#     for i in range(120000):
#         fp.write("127.25.254." + str(random.randint(1, 255)) + "\n")
# with open("ipx.txt", "r", encoding='utf-8') as fp:
#     for j in fp:
#         if j in s:
#             s[j] += 1
#         else:
#             s[j] = 1
# top10 = sorted(s.items(), key=lambda x: (x[1], x[0]),reverse=True)[:10]
# print(top10)


# 访客
# with open("name.txt","r+") as fp:
#     names=input("请输入你的名字:")
#     fp.write(names+"\n")

# mac地址
# 01-AF-3B
# import random
# lst=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"]
# with open("name.txt", "w+") as fp:
#     for i in range(100):
#         str1=random.sample(lst,2)
#         a=str1[0]+str1[1]
#         str2=random.sample(lst,2)
#         b = str2[0]+str2[1]
#         str3=random.sample(lst,2)
#         c = str3[0]+str3[1]
#         fp.write(f"01-AF-3B-{a}-{b}-{c}\n")

# Walden------------不会写系列
# import collections
# import string
# with open("Walden.txt",encoding="utf-8") as fp:
#     fp = fp.read()
#     for i in fp:
#         if i in string.punctuation:  # 如果字符是标点符号的话就将其替换为空格
#             fp = fp.replace(i, " ")
#     fp = fp.lower().split(' ')
#     r=collections.Counter(fp)
#     print(r)




